<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>列表页</title>
		<link rel="stylesheet" type="text/css" href="http://127.0.0.1/mogujie/Static/Home/css/list.css"/>
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<link rel="stylesheet" href="http://127.0.0.1/mogujie/Static/Home/css/index.css" />
<link rel="stylesheet" type="text/css" href="http://127.0.0.1/mogujie/Static/Home/css/animate.css"/>
<script type="text/javascript" src="http://127.0.0.1/mogujie/Static/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="http://127.0.0.1/mogujie/Static/mgjs/index.js"></script>
</head>

<body>
<!-- 首页首屏开始**************************** -->


<!-- 顶部红色区域 -->
<div id="top">
	<!-- 顶级 -->
	<div id="pic">
	<!-- 右侧 -->
		<ul>
			    <?php if($hd['session']['username'] && $hd['session']['uid']){ ?>
				<li class='userinfo'>
					欢迎回来<a href="<?php echo U('Search/index');?>" class='uname' style="margin-right:10px ;"><?php echo $hd['session']['username'];?></a>
				</li>
				<li class="sp">|</li>
				<li><a href="<?php echo U('Login/out');?>">退出</a></li>  
			<?php }else{ ?>
				<li><a href="<?php echo U('Register/index');?>">注册</a></li>
				<li><a href="<?php echo U('Login/index');?>">登陆</a></li>
			<?php } ?>
			<li><span>|</span><a href="">QQ登陆</a></li>
			<li><a href="">微信登陆</a></li>
			<li><a href="">微博登陆</a></li>
			<li><span>|</span><a href="">手机蘑菇街</a></li>
			<li><span>|</span><a href="">帮助中心</a></li>
			
		</ul>
		<!-- 中部 -->
		<div class="logo">
			<div class="logo-left">
				<a href="<?php echo U('Index/index');?>"><img src="http://127.0.0.1/mogujie/Static/Home/images/wjmsj.png" alt="" /></a>
			</div>
			<!-- 搜索区域 -->
			<div class="logo-middle">
				<form action="">
					<input type="text" class="l" value=" 清爽秋季，运动起来" />
					<input type="submit" class="y" value="" />
				</form>
				<!-- 购物车 -->
				<div class="car">
					<div class="xia-1">
						<a href="<?php echo U('Cart/index');?>">购物车
							<span>
								    <?php if($_SESSION['cart']){ ?>
								<?php echo $hd['session']['cart']['total_rows'];?>
								<?php }else{ ?>0<?php } ?>
							</span>件
						</a>
					</div>
					<div class="xia-2">
						    <?php if($_SESSION['cart']){ ?>
						<div>购物车中有<span style="color: #FF339B;">&nbsp;<?php echo $hd['session']['cart']['total_rows'];?>&nbsp;</span>件商品！
							<br />
							总价:￥<?php echo $hd['session']['cart']['total'];?>
						</div>
						<?php }else{ ?><div>购物车中还没有商品！</div><?php } ?>
					</div>	
				</div>
				<!-- 我的订单 -->
				<div class="count"><a href="<?php echo U('Order/index');?>">我的订单</a></div>
			</div>
		</div>
	</div>
</div>
<!-- 顶部红色区域结束 -->

<!-- 导航条开始 -->
<div id="nav">
	
	<ul>
		
		<li><a href="<?php echo U('Index/index');?>" class="a">首页</a></li>
		<?php foreach ($cateData as $k=>$v){?>
			<li><a href="<?php echo U('List/index',array('cid'=>$v['cid']));?>"><?php echo $v['cname'];?></a></li>
		<?php }?>
	</ul>
	<a href=""></a><img src="http://127.0.0.1/mogujie/Static/Home/images/ds3.jpg" alt="" />
</div>
<!-- 导航条结束 -->
<div id="red"></div>
		
		
<div id="screen">
	<ul>
		<?php foreach ($attr as $k=>$v){?>
			<li>
				<p><?php echo $v['name'];?>&nbsp;:</p>
				<ul>
					<?php 
						$temp = $param;
						//为"不限"准备的
						$temp[$k] = 0;
					?>
					<li>
						<a href="<?php echo U('List/index',array('cid'=>$_GET['cid'],'param'=>implode('_',$temp)));?>"     <?php if($param[$k]==0){ ?>class="hover"<?php } ?>>不限</a>
					</li>
					<?php foreach ($v['value'] as $key=>$value){?>
						<?php 
							$temp[$k] = $value['gtid'];										
						?>
						<li>
							<a href="<?php echo U('List/index',array('cid'=>$_GET['cid'],'param'=>implode('_',$temp)));?>"     <?php if($param[$k]==$value['gtid']){ ?>class="hover"<?php } ?> ><?php echo $value['gtvalue'];?></a>	
						</li>
					<?php }?>
				</ul>
			</li>
		<?php }?>
		
	</ul>
	
	
</div>
<!--首屏中部-->
<!--<div id="middle">
	<div class="m_left">
		<ul>
			<?php foreach ($cData as $k=>$v){?>
				左侧背景
				<li  class="clothe-<?php echo $k;?>     <?php if($_GET['cid']==$v['cid']){ ?>saclast-<?php echo $k;?><?php } ?>">
					<a href="<?php echo U('List/index',array('cid'=>$v['cid']));?>"><?php echo $v['cname'];?><span></span></a>
				</li>
			<?php }?>
		</ul>
		<div class="mleft_r">
			        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($SonData)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($SonData as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=100)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($SonData)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
				<dl     <?php if($hd['list']['v']['index']==4){ ?>class="m_last"<?php } ?>>
					<dt><a href=""><?php echo $v['cname'];?><span>HOT</span></a></dt>
					        <?php
        //初始化
        $hd['list']['value'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($v['son'])) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($v['son'] as $value) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=100)break;
                //第几个值
                $hd['list'][value]['index']++;
                //第1个值
                $hd['list'][value]['first']=($listId == 0);
                //最后一个值
                $hd['list'][value]['last']= (count($v['son'])-1 <= $listId);
                //总数
                $hd['list'][value]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
						<dd><a href=""><?php echo $value['cname'];?></a></dd>
					<?php }}?>
				</dl>
			<?php }}?>
		</div>
	</div>
	<div class="m_right">
		<div><a href=""><img src="http://127.0.0.1/mogujie/Static/Home/images/categroy-middle-1.jpg" alt="" /></a></div>
		<div><a href=""><img src="http://127.0.0.1/mogujie/Static/Home/images/categroy-middle-2.jpg"/></a></div>
	</div>
</div>-->

<!--单张图片-->
<div id="img_red">
	<a href=""></a>
</div>

<!--价格筛选-->
<div id="categroy_all">
	<h1>衬衫</h1>
	<ul class="ul_1">
		<li><a href="" class="f_donw">热门</a></li>
    	<li><a href="">最新</a></li>
		<li><a href="">爆款</a></li>
		<li class="xy"><a href="">信用</a></li>
	</ul>
	<!--<div id="">
		<ul>
			<li><a href="" class="f_donw">全部</a></li>
			<li><a href="">0-100元</a></li>
			<li><a href="">101-200元</a></li>
			<li><a href="">201-500元</a></li>
		</ul>
	</div>
	<form action="" method="post">
		<div>
			<span>￥</span>
			<input type="text" name="" id="" value="" />
		</div>
		<b>-</b>
		<div>
			<span>￥</span>
			<input type="text" name="" id="" value="" />
		</div>
		<p>确定</p>
	</form>-->
</div>

<!--图墙开始-->

<div id="chartss">
	<ul>
		        <?php
        //初始化
        $hd['list']['v'] = array(
            'first' => false,
            'last'  => false,
            'total' => 0,
            'index' => 0
        );
        if (empty($screen)) {
            echo '';
        } else {
            $listId = 0;
            $listShowNum=0;
            $listNextId=0;
            foreach ($screen as $v) {
                //开始值
                if ($listId<0) {
                    $listId++;
                    continue;
                }
                //步长
                if($listId!=$listNextId){$listId++;continue;}
                //显示条数
                if($listShowNum>=100)break;
                //第几个值
                $hd['list'][v]['index']++;
                //第1个值
                $hd['list'][v]['first']=($listId == 0);
                //最后一个值
                $hd['list'][v]['last']= (count($screen)-1 <= $listId);
                //总数
                $hd['list'][v]['total']++;
                //增加数
                $listId++;
                $listShowNum++;
                $listNextId+=1
                ?>
			<!--如果能被5整除说明是5的倍数，加一个class,让其float右浮动-->
			<li     <?php if(is_int($hd['list']['v']['total']/5)){ ?>class="jacket-last"<?php } ?>>
				<a href="<?php echo U('Content/index',array('gid'=>$v['gid']));?>"><img src="http://127.0.0.1/mogujie/<?php echo $v['pic'];?>" /></a>
				<p><a href=""><?php echo $v['gname'];?>...</a></p>
				<p>
					<span class="rmb"><u></u><?php echo $v['shopprice'];?></span>
					<span class="like"><?php echo $v['click'];?></span>
				</p>
			</li>
		<?php }}?>
	</ul>
</div>
<script type="text/javascript">
	$(function(){
		$('#chartss li').hover(function(){
//			alert();
			$(this).addClass('animated fadeIn');
		},function(){
			$(this).removeClass('fadeIn');
		})
	})
</script>
<!--图墙结束-->

<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!-- 底部图片 -->
<div id="bottom">
	<div class="bfb ">
		<a href=""><img src="http://127.0.0.1/mogujie/Static/Home/images/bottom-1.png" alt="" /></a>
		<a href=""><img src="http://127.0.0.1/mogujie/Static/Home/images/bottom-2.png" alt="" /></a>
		<a href=""><img src="http://127.0.0.1/mogujie/Static/Home/images/bottom-3.png" alt="" class="bfb-last" /></a>
	</div>
</div>
<!-- 底部文字 -->
<div id="b_font">
	<div class="bb_font">
		<div class="b_font_l">
			<a href="" class="bone"></a>
			<p>营业执照注册号：<a href="">330106000129004</a></p>
			<p>增值电信业务经营许可证：<a href="">浙B2-20110349</a></p>
			<p>ICP备案号：浙ICP备10044327号-3</p>
			<p>©2015 Mogujie.com 杭州卷瓜网络有限公司</p>		
		</div>
		<div class="b_font_r">
			<dl>
				<dt>公司</dt>
				<dd><a href="">关于我们</a></dd>
				<dd><a href="">招聘信息</a></dd>
				<dd><a href="">联系我们</a></dd>
			</dl>  

			<dl>
				<dt>消费者</dt>
				<dd><a href="">帮助中心</a></dd>
				<dd><a href="">意见反馈</a></dd>
				<dd><a href="">手机版下载</a></dd>
			</dl>
			<dl>
				<dt>商家</dt>
				<dd><a href="">免费开店</a></dd>
				<dd><a href="">商家入驻</a></dd>
				<dd><a href="">管理后台</a></dd>
			</dl>
			<dl class="llast">
				<dt>权威认证</dt>
				<dd>
					<a href="" class="llast-1"></a>
					<a href="" class="llast-2"></a>
					<a href="" class="llast-3"></a>
				</dd>
			</dl>
		</div>
	</div>
</div>




<!-- 底部文字结束 -->
</body>
</html>
